<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@include file="../base.jsp" %>

<sys:genericTag4o id="menuTree4ConfJson" methodName="menuTree4ConfJson" className="com.tmpt.controller.taglib.SecurityV2Tag"/>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<link href="../css/main.css" rel="stylesheet" type="text/css" >
<link rel="stylesheet" type="text/css" href="../../js/jquery/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../js/jquery/easyui/themes/icon.css">
<script type="text/javascript" src="../../js/jquery-1.8.0.min.js"></script>
<script src="../../js/jquery/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript">
$(function(){
	$('#tt1').tree({
		data:${menuTree4ConfJson}
	});
});

function addMenu1(){
    $("#addMenu1Id").val('处理中..');
    $("#addMenu1Id").attr({"disabled":"disabled"});
    document.formAddMenu1.submit();
}

function addMenu2(){
    $("#addMenu2Id").val('处理中..');
    $("#addMenu2Id").attr({"disabled":"disabled"});
    document.formAddMenu2.submit();
}

function addMenuFun(){
    $("#addMenuFunId").val('处理中..');
    $("#addMenuFunId").attr({"disabled":"disabled"});
    document.formAddMenuFun.submit();
}

</script>
</head>
<body class="font14">
<div style="float: left;">
<div style="color: red; text-align: center;">
	<s:property value="#attr.result"/>
</div>
<br/>
<s:form name="formAddMenu1" id="formAddMenu1" action="securityv2_addMenu1.action" namespace="/admin123/right_v2" theme="simple">
<table border="1" width="400"  bordercolor="#99BBE8" cellpadding="1" cellspacing="1">
	<caption>增加一级菜单</caption>
	<tr>
		<td>菜单名:</td>
		<td>
			<input type="text" name="menu1Name" maxlength="20">
		</td>
		<td>排序:</td>
		<td>
			<input type="text" name="sort" size="3">
		</td>
		<td>
			<input type="button" id="addMenu1Id" value="提交" onclick="addMenu1()">
		</td>
	</tr>
</table>
</s:form>
<br/>

<s:form name="formAddMenu2" id="formAddMenu2" action="securityv2_addMenu2.action" namespace="/admin123/right_v2" theme="simple">
<table border="1"  bordercolor="#99BBE8" cellpadding="1" cellspacing="1">
	<caption>增加二级菜单</caption>
	<tr>
		<td>
			一级菜单名称:
		</td>
		<td>
			<input type="text" name="menu1Name">
			<input type="text" name="menu1Id" size="5">
		</td>
	</tr>
	<tr>
		<td>
			二级菜单名:
		</td>
		<td>
			<input type="text" name="menu2Name" maxlength="20">
		</td>
	</tr>
	<tr>
		<td>
			排序:
		</td>
		<td>
			<input type="text" name="sort" >
		</td>
	</tr>
	<tr>
		<td>
			访问的URL:
		</td>
		<td>
			<input type="text" name="url" size="50">
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<input type="button" id="addMenu2Id" value="提交" onclick="addMenu2()">
		</td>
	</tr>
</table>
</s:form>

<br/>

<s:form name="formAddMenuFun" id="formAddMenuFun" action="securityv2_addMenuFun.action" namespace="/admin123/right_v2" theme="simple">
<table border="1"  bordercolor="#99BBE8" cellpadding="1" cellspacing="1">
	<caption>增加二级菜单下的功能列表</caption>
	<tr>
		<td>
			二级菜单名:
		</td>
		<td>
			<input type="text" name="menu2Name" maxlength="20">
			<input type="text" name="menu2Id" size="5">
		</td>
	</tr>
	<tr>
		<td>
			名称:
		</td>
		<td>
			<input type="text" name="menuFunName" size="50">
		</td>
	</tr>
	<tr>
		<td>
			访问类型:
		</td>
		<td>
			<s:select
				name="accessTypeLevel"
				list="#{0:'read',1:'write',2:'secret'}"
				theme="simple"
			/>

		</td>
	</tr>
	<tr>
		<td>
			资源URL:
		</td>
		<td>
			<input type="text" name="url" size="50">
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<input type="button" id="addMenuFunId" value="提交" onclick="addMenuFun()">
		</td>
	</tr>
</table>
</s:form>
<br/>


<br/>
二级菜单访问页前缀：
<br/>
<input type="text" value="${attr.url_queryPage}" size="80">
<br/>
二级菜单访问页查询Ajax前缀：
<br/>
<input type="text" value="${attr.url_queryAction}" size="80">
<br/>
二级菜单中增加修改Ajax前缀：
<br/>
<input type="text" value="${attr.url_addAction}" size="80">
<br/>
二级菜单中历史页查询前缀：
<br/>
<input type="text" value="${attr.url_historyPage}" size="80">


</div>

<div style="float: right; margin-right: 10px;">
<table class="table2" style="height: 600px;" cellpadding="0" cellspacing="0">
	<thead>
	<tr>
		<td>菜单树结构关系</td>
	</tr>
	</thead>
	<tr>
		<td>
			<div id="tt1" animate="true" style="width: 800px;height: 600px; margin: 10px;" ></div>
		</td>
	</tr>
</table>
</div>


</body>
</html>